import {observable,action,computed} from 'mobx'
import { ajax } from '../api';

class Anno{
    @observable annoList:any=null;

    @action getAnnoList=async()=>{
        let res=await ajax.annolist()
        res.code=200&&(this.annoList=res.result.reverse())
        
    }
    @action changeanno= (payload:any) =>{
        this.annoList = payload;
    }
    @observable filterannoList:any=null;

    @action filtergetAnnoList=async(payload:any)=>{
        let res=await ajax.annolist()
        res.code=200&&(this.filterannoList=res.result.filter((v:any)=>v.info._id==payload).reverse())
        
    }
}

export default new Anno() 